package com.hello.system.service.impl;

import java.util.List;
import com.hello.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hello.system.mapper.FishDetectionModelMapper;
import com.hello.system.domain.FishDetectionModel;
import com.hello.system.service.IFishDetectionModelService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 鱼类检测模型管理Service业务层处理
 * 
 * @author hello
 * @date 2025-08-15
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class FishDetectionModelServiceImpl extends ServiceImpl<FishDetectionModelMapper, FishDetectionModel> implements IFishDetectionModelService 
{
    private final FishDetectionModelMapper fishDetectionModelMapper;

    /**
     * 查询鱼类检测模型管理
     * 
     * @param modelId 鱼类检测模型管理主键
     * @return 鱼类检测模型管理
     */
    @Override
    public FishDetectionModel selectFishDetectionModelByModelId(Long modelId)
    {
        return fishDetectionModelMapper.selectFishDetectionModelByModelId(modelId);
    }

    /**
     * 查询鱼类检测模型管理列表
     * 
     * @param fishDetectionModel 鱼类检测模型管理
     * @return 鱼类检测模型管理
     */
    @Override
    public List<FishDetectionModel> selectFishDetectionModelList(FishDetectionModel fishDetectionModel)
    {
        return fishDetectionModelMapper.selectFishDetectionModelList(fishDetectionModel);
    }

    /**
     * 新增鱼类检测模型管理
     * 
     * @param fishDetectionModel 鱼类检测模型管理
     * @return 结果
     */
    @Override
    public int insertFishDetectionModel(FishDetectionModel fishDetectionModel)
    {
        fishDetectionModel.setCreateTime(DateUtils.getNowDate());
        return fishDetectionModelMapper.insertFishDetectionModel(fishDetectionModel);
    }

    /**
     * 修改鱼类检测模型管理
     * 
     * @param fishDetectionModel 鱼类检测模型管理
     * @return 结果
     */
    @Override
    public int updateFishDetectionModel(FishDetectionModel fishDetectionModel)
    {
        fishDetectionModel.setUpdateTime(DateUtils.getNowDate());
        return fishDetectionModelMapper.updateFishDetectionModel(fishDetectionModel);
    }


    /**
     * 批量删除鱼类检测模型管理
     * 
     * @param modelIds 需要删除的鱼类检测模型管理主键
     * @return 结果
     */
    @Override
    public int deleteFishDetectionModelByModelIds(Long[] modelIds)
    {
        return fishDetectionModelMapper.deleteFishDetectionModelByModelIds(modelIds);
    }

    /**
     * 删除鱼类检测模型管理信息
     * 
     * @param modelId 鱼类检测模型管理主键
     * @return 结果
     */
    @Override
    public int deleteFishDetectionModelByModelId(Long modelId)
    {
        return fishDetectionModelMapper.deleteFishDetectionModelByModelId(modelId);
    }
}
